package test;

import java.util.Scanner;

public class HuaWei1 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String[] strings = input.split(" ");
        long[] arr = new long[strings.length];
        for (int i = 0; i < strings.length; i++) {
            arr[i] = Long.parseLong(strings[i]);
        }
        getRes(arr);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
    private static void getRes(long[] nums) {
        for (int i = 0; i < nums.length; i++) {
            nums[i] = swap(nums[i]);
        }
        long pre = 3 & nums[0];
        long temp;
        for (int i = 1; i < nums.length; i++) {
             temp = 3 & nums[i];
             nums[i] = (pre << 30) | (nums[i] >>> 2);
             pre = temp;
        }
        nums[0] = (pre << 30) | (nums[0] >>> 2);
    }

    private static long swap(long num){

        //分别提取奇数位和偶数位
        long even = num&0xaaaaaaaa;//0xaaaaaaaa=1010...1010(二进制1010 x8)
        long odd = num&0x55555555;//0x55555555=0101...0101(二进制0101 x8)

        //移位合并
        long newEven = odd<<1;//这样移动才不会丢失有效数字(只是丢失0)
        long newOdd = even>>1;

        return newEven^newOdd;//与有效位相^的都是0，所以等价于 newEven|newOdd
    }


}
